/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


app.service('KeDeskDataService', function($q, $http){
    
    return {
        keDeskgetData: getData,
        keProcessLabel: processLabel,
        keGetPrinters: getPrinters
    }   
    
    function getPrinters() {
        var url = "http://localhost/kesillo/getPrinters";
        return $http.get(url);
        
    }
    
    function processLabel(labelData) {
        
        var url = "http://localhost/kesillo/processLabelData";
        return $http.post(url, labelData);
    }
    
    function getData(dataSet) {
        
        var url = 'http://localhost/kesillo/listApps';
        var request = $http.get(url);
        
        request.cache = false;
        
        return request;
        
    }
});